ALL=genlab cheminlab
LDLIBS = -I /usr/X11R6/lib -lX11

all : $(ALL)

genlab : genlab.c genlab.h ens.o mat.o laby.o graph.o inclusions.h
	gcc -Wall -g -o genlab genlab.c ens.o mat.o laby.o graph.o $(LDLIBS)
cheminlab : cheminlab.c cheminlab.h ens.o mat.o laby.o graph.o inclusions.h
	gcc -Wall -g -o cheminlab cheminlab.c ens.o mat.o laby.o graph.o $(LDLIBS)
mat.o : mat.c mat.h ens.h inclusions.h
	gcc -Wall -g -c mat.c
ens.o : ens.c ens.h inclusions.h
	gcc -Wall -g -c ens.c
laby.o : laby.c laby.h ens.h inclusions.h
	gcc -Wall -g -c laby.c
graph.o : GRAPH/graph.c GRAPH/graph.h
	make -C GRAPH
	cp GRAPH/graph.o graph.o

clean :
	rm *.o

doc :
	doxygen
